class DefaultFilterData {
  int? brandId;
  int? cityId;
  String? carState;
  String? carType;
  String? vip;
  String? offerType;
  double? powerMax;
  double? powerMin;
  double? priceMax;
  double? priceMin;
  DateTime? startDate;
  DateTime? endDate;

  rest() {
    startDate = null;
    endDate = null;
    brandId = null;
    brandId = null;
    cityId = null;
    carState = null;
    carType = null;
    vip = null;
    offerType = null;
    powerMax = null;
    powerMin = null;
    priceMax = null;
    priceMin = null;
    startDate = null;
    endDate = null;
  }

  Map<String, dynamic> toJson({Map<String, dynamic>? otherMap}) {
    late Map<String, dynamic> data;
    if(otherMap!= null){
      data = otherMap;
    }else{
      data = {};
    }

     if (brandId != null) data["brand"] = brandId;
     if (cityId != null) data["city"] = cityId;
     if (carState != null) data["carState"] = carState;
     if (carType != null) data["carType"] = carType;
     if (vip != null) data["vip"] = vip;
     if (offerType != null) data["offerType"] = offerType;
     if (priceMax != null) {
       data["price"] = {
       'max':priceMax,
       'min':priceMin,
     };
     }
     if (powerMax != null) {
       data["power"] = {
       'max':powerMax,
       'min':powerMin,
     };
     }

    return data;
  }

  
}
